package com.atguigu.springCloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zgw
 * @date 2020/4/12 16:01
 */
@RestController
@RefreshScope//动态刷新配置文件
public class ConfigClientController {
    @Value("${config.infor}")
    private String configInfo;

    @GetMapping("/config/info")
    public String getConfigInfo() {
        return configInfo;
    }
}
